package lab6_Adapter_FigGeometrice;

public class Triunghi implements Poligon {
	public Punct a;
	public Punct b;
	public Punct c;
	
	public Triunghi(Punct a, Punct b, Punct c) {
		super();
		this.a = a;
		this.b = b;
		this.c = c;
	}
	public double perimetru()
	{
		return a.distanta(b)+b.distanta(c)+c.distanta(a);
	}
	public double arie()
	{
		double sp=this.perimetru();
		return Math.sqrt((sp-a.distanta(b))*(sp-b.distanta(c))*(sp-c.distanta(a)));
	}

}
